package com.abxh.core.utils

import android.util.Log

/**
 * Created by dab on 2021/9/27 14:02
 */

inline fun Any?.loge() {
    if (!LogUtils.isShowLog()) {
        return
    }
    val stackTrace = Throwable().stackTrace
    val className = stackTrace[1].fileName
    val methodName = stackTrace[1].methodName
    val lineNumber = stackTrace[1].lineNumber
    val tag = "($className:$lineNumber)"
    if (this == null) {
        Log.e(tag, "$methodName:null")
    } else {
        Log.e(tag, "$methodName:$this")
    }
}